#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
typedef long long ll;
using namespace std;
//不开long long会超时
ll fun(ll n,ll k){
    if(k==pow(2,n-1)){
        return n;
    }
    else{
        return fun(n-1,abs(k-pow(2,n-1)));
    }
}
ll solve(ll n,ll k){
    while(n>=1){
        if(k==pow(2,n-1)){
            return n;
        }   
        k=abs(k-pow(2,n-1));
        n--;
    }
    return n;
}
int main(void){
    ll n,k;
    scanf("%lld%lld",&n,&k);
    printf("%lld\n",solve(n,k));
    return 0;
}